[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
GETE()

    GETE() retrieves the contents of a DOS environmental variable.

Syntax

    GETE(<expC>)

Argument

    <expC> is the name of the DOS environmental variable completely upper
case.  Note that when an environmental variable is SET, it is
converted to upper case.

Returns

    A character string.

    GETE() returns the contents of the specified DOS environmental
variable.  If the <expC> cannot be found, GETE() returns a null string
("").

    Note: If you are certain that an environmental variable exists and
yet GETE() always returns a null string (""), be sure there are no
spaces between the environmental variable name and the first character
of the string assigned to it.

Usage

    GETE() is useful for passing configuration information from the DOS
environment into an application program.  Typically, this could be
configuration information that includes pointers to the location of
files (database, index, label, or reports).  This is particularly
useful for network environments.

For example, when you set up a system define environmental variables
that contain the location of various file types along with the CLIPPER
environmental variable.  The following DOS commands demonstrate:

C>SET LOC_DBF=<database file path>
C>SET LOC_NTX=<index file path>
C>SET LOC_RPT=<report file path>

In the configuration section of your application program, assign the
contents of the environmental variables to memory variables.  Then
when you access a file, preface the reference with the path variable:

loc_dbf=GETE("LOC_DBF")
USE (loc_dbf + "<alias>")

Example

    path_set = GETE("PATH")
    SET PATH TO &path_set. 

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson